using System.ComponentModel.DataAnnotations;

namespace KL.Standard.Model.ViewModels.InParams;

/// <summary>
/// 多个ID
/// </summary>
public class MutlIDVM
{
    [Display(Name = "ID")]
    [Required(ErrorMessage = "{0}不能为空")]
    public string ids { set; get; }

    public string[] idList()
    {
        if (!string.IsNullOrEmpty(ids))
        {
            return ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
        }
        else
        {
            return new string[] { "" };
        }
    }
}